﻿using IdentityModel.Client;
using ShanNiang.Hosting.Common;
using ShanNiang.Service.LoginModels.Responses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.Interfaces
{
    /// <summary>
    /// 客服看服务借口
    /// </summary>
    public interface IClientService<TReq> where TReq : RequestBase
    {
        ///// <summary>
        ///// 设置服务器地址
        ///// </summary>
        ///// <param name="server"></param>
        //void SetServer(string server);
        /// <summary>
        /// 获取响应内容
        /// </summary>
        /// <typeparam name="TRsp"></typeparam>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<TRsp?> GetResponse<TRsp>(TReq request);
        /// <summary>
        /// 获取token
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IdsToken?> GetTokenAsync();
    }
}
